# 需要开启这个参数，https://github.com/jemalloc/jemalloc/issues/1328
MYSQL_HOME=${DEFAULT_MYSQL_HOME:-'/opt/software/mysql'}
mkdir -p ${MYSQL_HOME}/data
mkdir -p ${MYSQL_HOME}/conf.d

docker stop mysql && docker rm mysql
docker run -itd --name mysql --restart=always -e MYSQL_ROOT_PASSWORD=p@ssw0rd -p 3306:3306 -e TZ=Asia/Shanghai \
 -v ${MYSQL_HOME}/data:/var/lib/mysql \
 -v ${MYSQL_HOME}/conf.d:/etc/mysql/conf.d/ \
 mysql:8.0.37

docker logs -f mysql

